"""
向不安全链接发送请求
没有CA证书认证
https:http协议+SSL(安全套接字层)
"""
import requests

url = "http://sam.huat.edu.cn:8443/selfservice/"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36'
}
# 访问没有CA认证的网页会报错SSLERROR
# responce = requests.get(url,headers=headers)
# 发送请求时忽略CA认证
responce = requests.get(url, headers=headers, verify=False)
print(responce.status_code)
print(responce.content.decode('gbk'))
